package com.hsc.yalebao.tabMine;

import android.annotation.SuppressLint;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.gson.Gson;
import com.hsc.yalebao.base.ActivityStack;
import com.hsc.yalebao.base.BaseActivity;
import com.hsc.yalebao.base.CustomApplication;
import com.hsc.yalebao.base.MainActivity;
import com.hsc.yalebao.http.AppConstants;
import com.hsc.yalebao.http.RequestNet;
import com.hsc.yalebao.model.IsSetBankCardBean;
import com.hsc.yalebao.model.IsSetBankCardModel;
import com.hsc.yalebao.model.UserBaseBean;
import com.hsc.yalebao.tools.UiUtil;
import com.hsc.yalebao.weight.LogUtils;
import com.zhy.http.okhttp.callback.StringCallback;
import java.util.HashMap;
import okhttp3.Call;

public class BankCardActivity extends BaseActivity
{
  private String TAG = "-BankCardActivity-";
  private Context context;
  private ImageView img_commit;
  private ImageView iv_title_right;
  private int memberid;
  View.OnClickListener onClickListener = new View.OnClickListener()
  {
    public void onClick(View paramAnonymousView)
    {
      switch (paramAnonymousView.getId())
      {
      case 2131099704:
      default:
        return;
      case 2131099699:
        CustomApplication.app.finishActivity(BankCardActivity.this);
        return;
      case 2131099742:
      }
      BankCardActivity.this.startActivity(new Intent(BankCardActivity.this, BoundBankCardActivity.class));
    }
  };
  private TextView tv_user_bank_address;
  private TextView tv_user_bank_name;
  private TextView tv_user_bank_num;
  private TextView tv_user_rela_name;
  private View view_title;

  public void Issetbankcard()
  {
    if (CustomApplication.app.userBaseBean != null)
      this.memberid = CustomApplication.app.userBaseBean.getMemberid();
    HashMap localHashMap = new HashMap();
    localHashMap.put("memberid", this.memberid);
    LogUtils.d(this.TAG, "URL:" + AppConstants.URL_GET_ISSETBANKCARD);
    showLoadingDialog();
    RequestNet.get(this.context, AppConstants.URL_GET_ISSETBANKCARD, localHashMap, new StringCallback()
    {
      public void onError(Call paramAnonymousCall, Exception paramAnonymousException)
      {
        BankCardActivity.this.dismissLoadingDialog();
        LogUtils.e(BankCardActivity.this.TAG, "获取失败,获取提现记录:" + paramAnonymousException);
      }

      public void onResponse(String paramAnonymousString)
      {
        BankCardActivity.this.dismissLoadingDialog();
        if (UiUtil.IsValueEmpty(paramAnonymousString))
          LogUtils.d(BankCardActivity.this.TAG, "为空时result:" + paramAnonymousString);
        IsSetBankCardModel localIsSetBankCardModel;
        do
        {
          return;
          Gson localGson = new Gson();
          try
          {
            localIsSetBankCardModel = (IsSetBankCardModel)localGson.fromJson(paramAnonymousString, IsSetBankCardModel.class);
            if (localIsSetBankCardModel == null)
            {
              LogUtils.e(BankCardActivity.this.TAG, "isSetBankCardModel，获取失败");
              return;
            }
          }
          catch (Exception localException)
          {
            while (true)
            {
              localException.printStackTrace();
              localIsSetBankCardModel = null;
            }
            if (localIsSetBankCardModel.getFlag() == 0)
            {
              UiUtil.showToast(BankCardActivity.this.context, localIsSetBankCardModel.getMsg());
              return;
            }
            if (localIsSetBankCardModel.getFlag() == -2)
            {
              BankCardActivity.this.showDownWireDialog();
              return;
            }
            if (localIsSetBankCardModel.getFlag() == -3)
            {
              BankCardActivity.this.ShowFengjinDialog();
              return;
            }
            if (localIsSetBankCardModel.getFlag() == -4)
            {
              BankCardActivity.activityStack.backToMain(MainActivity.class, BankCardActivity.this.context);
              return;
            }
          }
        }
        while (localIsSetBankCardModel.getFlag() != 1);
        IsSetBankCardBean localIsSetBankCardBean = localIsSetBankCardModel.getBankinfo();
        if (localIsSetBankCardBean == null)
        {
          LogUtils.e(BankCardActivity.this.TAG, "isSetBankCardModel-result=null");
          return;
        }
        String str1 = localIsSetBankCardBean.getAccountholder();
        String str2 = localIsSetBankCardBean.getBankcardid();
        String str3 = localIsSetBankCardBean.getBankname();
        String str4 = localIsSetBankCardBean.getBankaddress();
        if (str1 == null)
        {
          BankCardActivity.this.tv_user_rela_name.setText("null");
          if (str3 != null)
            break label335;
          BankCardActivity.this.tv_user_bank_name.setText("null");
          label285: if (str2 != null)
            break label350;
          BankCardActivity.this.tv_user_bank_num.setText("null");
        }
        while (true)
        {
          if (str4 != null)
            break label365;
          BankCardActivity.this.tv_user_bank_address.setText("null");
          return;
          BankCardActivity.this.tv_user_rela_name.setText(str1);
          break;
          label335: BankCardActivity.this.tv_user_bank_name.setText(str3);
          break label285;
          label350: BankCardActivity.this.tv_user_bank_num.setText(str2);
        }
        label365: BankCardActivity.this.tv_user_bank_address.setText(str4);
      }
    });
  }

  protected void onCreate(Bundle paramBundle)
  {
    super.onCreate(paramBundle);
    setContentView(2130903043);
    CustomApplication.app.addActivity(this);
    this.context = this;
    setTitle(8, 0, 2130837809, "银行卡", 0, 8, 8, 0, true);
    this.tv_user_rela_name = ((TextView)findViewById(2131099734));
    this.tv_user_bank_name = ((TextView)findViewById(2131099736));
    this.tv_user_bank_num = ((TextView)findViewById(2131099738));
    this.tv_user_bank_address = ((TextView)findViewById(2131099740));
    this.img_commit = ((ImageView)findViewById(2131099742));
    this.img_commit.setOnClickListener(this.onClickListener);
  }

  protected void onDestroy()
  {
    super.onDestroy();
  }

  protected void onResume()
  {
    super.onResume();
    Issetbankcard();
  }

  @SuppressLint({"NewApi"})
  public void setTitle(int paramInt1, int paramInt2, int paramInt3, String paramString, int paramInt4, int paramInt5, int paramInt6, int paramInt7, boolean paramBoolean)
  {
    View localView = findViewById(2131099716);
    if (paramBoolean)
      localView.setVisibility(0);
    while (true)
    {
      ((TextView)localView.findViewById(2131099701)).setText(paramString);
      ((TextView)localView.findViewById(2131099700)).setVisibility(paramInt1);
      ImageView localImageView = (ImageView)localView.findViewById(2131099699);
      localImageView.setVisibility(paramInt2);
      localImageView.setOnClickListener(this.onClickListener);
      localImageView.setImageResource(paramInt3);
      TextView localTextView = (TextView)localView.findViewById(2131099702);
      localTextView.setVisibility(paramInt5);
      localTextView.setOnClickListener(this.onClickListener);
      this.iv_title_right = ((ImageView)localView.findViewById(2131099704));
      this.iv_title_right.setVisibility(paramInt6);
      this.iv_title_right.setOnClickListener(this.onClickListener);
      this.iv_title_right.setImageResource(paramInt7);
      return;
      localView.setVisibility(8);
    }
  }
}

/* Location:           C:\Users\user\Desktop\dd28_pcdd720\classes_dex2jar.jar
 * Qualified Name:     com.hsc.yalebao.tabMine.BankCardActivity
 * JD-Core Version:    0.6.2
 */